<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomEmploy"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomFileUpload"%>
<%@page import="java.util.Iterator"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String meetingName=(String)request.getAttribute("strName");
	MeetingRoomEmploy roomempoly=(MeetingRoomEmploy)request.getAttribute("roomEmpoly");
	ArrayList<MeetingRoomFileUpload> fileList=(ArrayList<MeetingRoomFileUpload>)request.getAttribute("fileList");
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<base href="<%=basePath%>" />
	<head>
		<title>天津市粮油集团有限公司</title>
		<style type="text/css">
td {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

th {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

.black_overlays {
	display: none;
	position: absolute;
	top: 0%;
	left: 0%;
	width: 1200px;
	height: 800px;
	background-color: gray;
	z-index: 1001;
	-moz-opacity: 0.8;
	opacity: .80;
	filter: alpha(opacity = 80);
}

/* 添加任务div样式 */
.ceshi5 {
	 display: none;
				position: absolute;
				top: 25%;
				left: 30%;
				width: 253px;
				height: 235px;
				border: 1px solid #11557B;
				border-bottom: block;
				background-color: #E2F7FF;
				z-index: 1003;
				overflow: auto;
}
</style>
	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" />
	<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
  	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
	<script type="text/javascript">
	function back()
	{
		history.back(-1);
	}
	
	function deletefrom(id)
    {
	   Ext.MessageBox.confirm('提示框', '您确认删除此会议,此操作不可逆转,请谨慎操作!', function(btn){
			if(btn=='yes'){
				window.location.href = '<%=basePath %>tjsinfo/tjsoa/meetingroom/deleteArrangements.do?id='+id;
			}
		});
    }
	
	window.onload = function(){
		document.getElementById("right").style.height = document.body.clientHeight;
		document.getElementById("tableid").style.height = document.body.clientHeight;
		var tb = new Ext.Toolbar(
			{
				height:25
			}
		);
	
	    tb.render('menu');
		tb.add(
	    {
	            text:'返回',
	            iconCls: 'daohang',
	        	handler: function(){
	        		back();
				}
	    },
	    {
	            text:'修改',
	            iconCls: 'daohang',
	        	handler: function(){
	        		window.location.href = '<%=basePath%>tjsinfo/tjsoa/meetingroom/updateArrangements.do?&id=<%=roomempoly.getId() %>';
				}
	    },
	    {
	            text:'删除',
	            iconCls: 'daohang',
	        	handler: function(){
	        		deletefrom('<%=roomempoly.getId() %>');
				}
	    }
	    );
		tb.addFill();
	    tb.addText('<img id="windowResize" src="<%=basePath%>images/m_icon05.gif;"><a style="font-weight:bold; color:black;line-height: 22px;">查看会议</a>&nbsp;&nbsp;&nbsp;');
	}
    </script>
	</head>
	<body>
		<div id="right" style="overflow-y:scroll;">
		<div id="menu" style="padding-top:4px;"></div>
		<form action="<%=basePath%>tjsinfo/tjsoa/meetingroom/againUpdateArrangements.do" method="post" name="form1">
     	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableid">
          <tr>
            <td valign="top" height="100%">
               <div class="contabwd">
               		<table width="100%" height="400"border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="90%">
                            	<table border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top:10px; margin-left:20px">
                                  <tr>
                                    <td>
                                       <table border="0" align="left" cellpadding="0" cellspacing="0" class="ttaabb">
                                       	<%//申请的
										if("1".equals(roomempoly.getMeetingId())){
										%>
										<tr>
											<td width="100px" align="right">
												<img src="images/dfdf_03.gif" />
												&nbsp;申请人:
											</td>
											<td width="251px">
											<!-- <input name="meetingName" type="text" size="41"
													style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px" /> -->
												<%=roomempoly.getApplicationUserName() %>&nbsp;<%=roomempoly.getBumen() %>
											</td>
											<td width="20px">
												&nbsp;
											</td>
										</tr>
										<%}else{%>
										<tr>
											<td width="100px" align="center" colspan="3">
												此会议为负责人直接安排
											</td>
										</tr>
										<%} %>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议名称:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=roomempoly.getMeetingName() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;所在会议室:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=roomempoly.getMeetingRoomMain().getMeetingroomName() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;所在地点:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=roomempoly.getMeetingRoomMain().getPlace() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议申请:</td>
                                           <td width="65%"><%if("2".equals(roomempoly.getMeetingId())){ out.print(roomempoly.getExamineUserName());%>直接安排<%}else{ %><%=roomempoly.getApplicationUserName() %>(<%=roomempoly.getBumen() %>)<%} %></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <%if("1".equals(roomempoly.getMeetingId())){%>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议审批:</td>
                                           <td width="65%"><%=roomempoly.getExamineUserName() %></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <%} %>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;开始时间:</td>
                                           <td><input readonly="readonly" name="startDay" type="text" value="<%=sdf.format(roomempoly.getStartTime()) %>" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/>
                                           </td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;会议持续:</td>
                                           <td><input readonly="readonly" name="endDay" type="text" value="<%=roomempoly.getEndTime() %>小时" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%if("1".equals(roomempoly.getMeetingId())){%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;参会人:</td>
                                           <td><input name="meetingPeople" id="meetingPeople" value="<%=meetingName %>" type="text" size="95" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/>
                                           </td>
                                           <td>
                                           &nbsp;
                                           </td>
                                         </tr>
										<%} %>
										<%
										if(fileList!=null && fileList.size()>0){
										%>
										<tr>
											<td align="right">
												<img src="images/dfdf_03.gif" />
												&nbsp;文件下载:
											</td>
											<td>
												<table width="400px" border="0" cellspacing="0">
												<tr>
													<td width="400px" cellpadding="0" cellspacing="0" class="ttaabb" style="font-weight:normal">
												<%
													for (Iterator iterator = fileList.iterator(); iterator.hasNext();) {
														MeetingRoomFileUpload file = (MeetingRoomFileUpload) iterator.next();
												%>
													<a href="<%=basePath %>tjsinfo/tjsoa/meetingroom/ioAction.do?id=<%=file.getUuid()%>"><%=file.getOldFileName()%></a>&nbsp;&nbsp;&nbsp;
												<%
												}
												%>
													</td>
												</tr>
												</table>
											</td>

										</tr>
										<%	
										}
										%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;内容及特殊需要:</td>
                                           <td><textarea readonly="readonly" name="content" cols="69" rows="10"><%=roomempoly.getMeetingContent() %></textarea></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%if("1".equals(roomempoly.getMeetingId())){
                                         	if(!"2".equals(roomempoly.getMeetingId())){%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;审批意见:</td>
                                           <td><textarea readonly="readonly" name="remarks" cols="69" rows="3"><%if(roomempoly.getMinutes()!=null)out.print(roomempoly.getMinutes()); %></textarea></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%
                                         	}
                                         } %>
                                         <tr>
                                           <th colspan="3">&nbsp;</th>
                                         </tr>
                                       </table>
                                    </td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                     </table>
              </div>
            </td>
          </tr>
      </table>
		</form>
		</div>
	</body>
</html>
